package cn.zy.sys.service.impl;

import cn.zy.basic.service.impl.BaseServiceImpl;
import cn.zy.sys.domain.Dictionarytype;
import cn.zy.sys.mapper.DictionarydetailMapper;
import cn.zy.sys.service.DictionarytypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 业务实现类:部门
 */
@Service
public class DictionarytypeServiceImpl extends BaseServiceImpl<Dictionarytype> implements DictionarytypeService {

    @Autowired
    private DictionarydetailMapper dictionarydetailMapper;


    @Override
    @Transactional
    public void del(Long id) {
        dictionarydetailMapper.delByTypeId(id);
        super.del(id);
    }

    @Override
    @Transactional
    public void patchDelete(List<Long> ids) {
        for(Long id:ids){
            del(id);
        }
    }
}
